import { IRouteComponentProps } from 'umi'
import { FC } from 'react';
import TeachersLayout from './teacherLayout'
import StudentsLayout from './StudentsLayout'
import './../global.less'

const Layouts: React.FC<IRouteComponentProps> = props => {
    // console.log(props.location.pathname)
    if (/\/teachers/.test(props.location.pathname)) {

        return <>
            <p className="PE_CSS">请在pc阅览</p>
            <div className="PC_CSS">
                <TeachersLayout>{props.children}</TeachersLayout>;

            </div>
        </>
    }else if(/\/students/.test(props.location.pathname)){

        return <>
            <p className="PE_CSS">请在pc阅览</p>
            <div className="PC_CSS">
                <StudentsLayout>{props.children}</StudentsLayout>;

            </div>
        </>
    }
    return props.children;
}
export default Layouts;